const { v4: uuidv4 } = require('uuid');

exports.resolvers = {
  Query: {
    getScore: (parent, args, content) => {
      console.log(root, args);
      const { n = 1 } = args;
      const data = [
        { name: 'Math', score: 100 },
        { name: 'English', score: 99.5 },
        { name: 'Chinese', score: 80.5 },
      ];
      return {
        id: uuidv4(),
        name: 'ataola',
        age: 18,
        gender: true,
        hobby: 'DANCING',
        course: data.slice(0, n),
      };
    },
  },
};
